<?php
/**
* @link http://framework.org/
* @copyright Copyright: 2003-2004 Doutromundo
* @author Gregory Brown <bugzbrown@gmail.com>
* @access public
* @package core
*/
/**
* DATETime VALUE OBJECT
* This object makes it simple to work with dates from and to MySQL
* The idea behind this is that with a simple object we can make working with dates a breeze
*
* @version 0.0.2
* @package core
*/
define('MYSQL_DATE','Y-m-d H:i:s');

class DateTime{

	var $_dateTime="";

	var $_year;
	var $_motnh;
	var $_day;

	var $_hours;
	var $_minutes;
	var $_seconds;

	function DateTime(){
		/**
		*@TODO: Implement the constructor class
		**/
	}


	/**
	 * Set the current date for the object;
	 * Will by default use a MySQL date Format (YYYY-MM-DD HH:mm:SS);
	 */
	function setMySQLDate($date){
		//CREATE DATE FROM MYSQL;
		$this->_year = substr($date,0,4);
		$this->_month = substr($date,5,2);
		$this->_day = substr($date,8,2);
		$this->_hour = substr($date,11,2);
		$this->_minutes = substr($date,14,2);
		$this->_seconds = substr($date,17,2);

		echo "$date<BR>$this->_year<BR>$this->_month<BR>$this->_day<BR>$this->_hour<BR>$this->_minutes<BR>$this->_seconds<BR>";
	}


	/**
	 * Convert the current date to MySQL format Date
	 *
	 */
	function toMysqlDate(){

	}
	/**
	 * Convert the current date to MySQL format Date/Time
	 *
	 */
	function toMysqlDateTime(){

	}
}

$k=new DateTime();
$k->setMySQLDate("2004-11-21 23:14:02");
?>